<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <script>
        // 继承的实现方式4：原型式继承
        // 创建一个比较纯洁的对象
        var obj = Object.create(null);
        console.log(obj);

        // 使用原型式继承
        var parent = { name: "parent", age: 18 };

        var child = Object.create(parent);
        console.log(child);
    </script>
</body>
</html>